@import "tailwindcss";
@custom-variant dark (&:where(.dark, .dark *));

* {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 全局主题变量 */
:root {
  --bg-color: #fff;
  --text-color: #222;
  --header-bg: #f5f5f5;
  --footer-bg: #f5f5f5;
  --card-bg: #fff;
}

.dark {
  --bg-color: #181c27;
  --text-color: #eee;
  --header-bg: #23272f;
  --footer-bg: #23272f;
  --card-bg: #23272f;
}

body,
#root {
  background: var(--bg-color);
  color: var(--text-color);
  transition: background 0.4s cubic-bezier(.4, 0, .2, 1), color 0.4s cubic-bezier(.4, 0, .2, 1);
}

.ant-layout,
.ant-layout-content,
.ant-layout-header,
.ant-layout-footer {
  background: var(--bg-color) !important;
  color: var(--text-color) !important;
  transition: background 0.4s cubic-bezier(.4, 0, .2, 1), color 0.4s cubic-bezier(.4, 0, .2, 1);
}

.ant-layout-header {
  background: var(--header-bg) !important;
}

.ant-layout-footer {
  background: var(--footer-bg) !important;
}

.ant-card,
.ant-card-body {
  background: var(--card-bg) !important;
  color: var(--text-color) !important;
}

.ant-menu,
.ant-menu-sub,
.ant-menu-inline,
.ant-menu-vertical {
  background: var(--bg-color) !important;
  color: #1677ff !important;
  transition: background 0.4s cubic-bezier(.4, 0, .2, 1), color 0.4s cubic-bezier(.4, 0, .2, 1);
}

.ant-menu-item,
.ant-menu-submenu-title {
  color: #1677ff !important;
}

.ant-menu-item-selected,
.ant-menu-item-active {
  color: #1677ff !important;
  background: rgba(22, 119, 255, 0.08) !important;
}

.ant-menu-dark .ant-menu-item-selected {
  color: #1677ff !important;
}

.ant-table,
.ant-table-container,
.ant-table-content,
.ant-table-thead>tr>th,
.ant-table-tbody>tr>td {
  background: var(--card-bg) !important;
  color: var(--text-color) !important;
  transition: background 0.4s cubic-bezier(.4, 0, .2, 1), color 0.4s cubic-bezier(.4, 0, .2, 1);
}

.ant-table-thead>tr>th {
  background: var(--header-bg) !important;
  color: var(--text-color) !important;
}

.ant-table-tbody>tr.ant-table-row-selected>td {
  background: rgba(22, 119, 255, 0.08) !important;
}

.ant-table .ant-btn,
.ant-table .ant-btn-primary,
.ant-table .ant-btn-dangerous {
  transition: background 0.4s, color 0.4s, border-color 0.4s;
}

.dark .ant-table .ant-btn {
  background: #23272f !important;
  color: #fff !important;
  border-color: #444 !important;
}

.dark .ant-table .ant-btn-primary {
  background: #1677ff !important;
  color: #fff !important;
  border-color: #1677ff !important;
}

.dark .ant-table .ant-btn-dangerous {
  background: #ff4d4f !important;
  color: #fff !important;
  border-color: #ff4d4f !important;
}